<template>
	<view id="containerBoxs" ref="containerBox">
		<web-view cache-control="no-cache" :src="url" class="web-view"></web-view>
	</view>
</template>

<script setup lang="ts">
import { token } from "@/api/common";
import { onLoad } from "@dcloudio/uni-app";
import { computed, reactive, ref } from "vue";
const containerBox = ref(null);
const query = reactive({
	width: 0,
	height: 0,
	id: ""
});

let tmp = ref('app')
// #ifdef MP-TOUTIAO
tmp.value = 'toutiao'
// #endif

// #ifdef MP-WEIXIN || WEB
tmp.value = 'weixin'
// #endif

const url = computed(() => {
	return `${import.meta.env.VITE_DETAIL_URL}/webview/?id=${query.id}&token=${token()}&tmp=${tmp.value}`;
});

onLoad((op: any) => {
	query.id = op.id;
});

</script>

<style lang="scss" scoped></style>
